<?php
class Shop extends CActiveRecord
{
	public static function model($classname=__CLASS__)
	{
		return parent::model($classname);
	}
	public function tableName()
	{
		return 'shop';
	}
	public function rules()
	{
		return array(
				array('shopname','required'),
				array('shopdescription','required'),
		);
	
	}
	public function relations()
	{
		return array(
				'buyshop'=>array(self::HAS_MANY,'buyshop','shopid'));
	}
}